package route

import (
	"github.com/gin-gonic/gin"
	"post/api/handel"
	"post/midware"
)

func Route(c *gin.Engine) {
	c.POST("/send", handel.SendSms)
	c.POST("/login", handel.Login)
	c.POST("/upload", handel.Upload)
	c.POST("/postAdd", handel.PostAdd)
	c.POST("/postList", handel.PostList)
	group := c.Group("/api", midware.JwtParse())
	{
		group.POST("/reals", handel.Reals)

		//评论
		group.POST("/comment", handel.Comment)
	}
	c.GET("/chat", handel.Chat)
	c.POST("/likeAdd", handel.LikeAdd)
	c.POST("/potShow", handel.PotShow)
	c.POST("/userShow", handel.UserShow)
	c.POST("/userUp", handel.UserUpdate)

}
